<?php if($mode == "PHOTO"){?>
<div class="widget">
    <div class="widgetTitle">
        <h3><?= $title;?></h3>
    </div>

    <div class="widgetContent bottom-border">
        <div class="row nomargin">
            <div class="col-md-12 col-sm-12 col-xs-12">
                <p class="block text-muted clearfix">
                    Please provide correct information of your Business and Services, we have full right to delete your
                    post anytime without prior intimation.
                </p>

                <?php if (Session::get('message')) { ?>
                    <p class="block clearfix text-red">
                        <i class="fa fa-exclamation-circle fa-2x pull-left "></i> <?= Session::get('message'); ?>
                    </p>
                <?php } ?>

                <style>

                    .parent {
                        width: 100%;
                        float: left;
                        margin-bottom: 12px;

                    }

                    .multiple {
                        max-height: 200px; overflow: auto; width: 100%; border: 1px solid #ddd;
                        list-style-type: none; margin: 0; padding: 10px; overflow-x: hidden;
                        font-weight: 300;
                    }



                </style>

                <form class="form-horizontal" method="post" action="<?= URL::current(); ?>" accept-charset="<?= Settings::get('en','charecter_set');?>" enctype="multipart/form-data">


                    <div class="form-group">
                        <label class="col-sm-2 control-label"></label>

                        <div class="col-sm-8">
                            <input type="file" name="image">
                            <div class="text-red small"><?php echo $errors->first('title') ?></div>
                        </div>

                    </div>
                    
                    <div class="form-group">
                        <div class="col-sm-offset-2 col-sm-10">
                        <input type="hidden" name="pID" id="pID" value="<?= $postID;?>">
                            <button type="submit" class="btn btn-info">Upload</button>
                            <?php if ($photo) { ?>
                              <a href="<?= URL::base();?>/member/post/video/<?= $postID;?>" class="btn btn-info">Next</a>
                              <?php }?>
                        </div>

                    </div>
                    
                     </form>
                     
                     <hr class="hr-normal">
					<ul>
						<?php if ($photo) { ?>
						<?php foreach ($photo as $photos): ?>
						<li class="col-md-2"><a id="mediaVideo" href="#"
							data-toggle="modal" data-target="<?= '#' . $photos->id; ?>"> <img
								src="<?= URL::base(); ?>/storage/uploads/photos/<?= $photos->value; ?>">
						</a>

							<div class="modal fade" id="<?= $photos->id; ?>" tabindex="-1"
								role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">


								<div class="modal-dialog">
									<div class="modal-content">

										<div class="modal-header">
											<?= $photos->title; ?>
											<button type="button" class="close" data-dismiss="modal"
												aria-hidden="true">X</button>

										</div>


										<div class="modal-body">

											<img 
												width="100px" height="400px" src="<?= URL::base(); ?>/storage/uploads/photos/<?= $photos->value; ?>"
												alt="">
										</div>

									</div>
									<!-- /.modal-content -->
								</div>
								<!-- /.modal-dialog -->

							</div> <!-- /.modal --></li>
						<?php endforeach;
	} else {
		?>
						<li>
							<div class="alert alert-warning">Opps! No data found...</div>
						</li>
						<?php } ?>

					</ul>
				</div>
			</div>
                     
            </div>
        </div>
   
<?php }?>
<?php if($mode == "VIDEO"){?>

<div class="widget">
    <div class="widgetTitle">
        <h3><?= $title;?></h3>
    </div>

    <div class="widgetContent bottom-border">
        <div class="row nomargin">
            <div class="col-md-12 col-sm-12 col-xs-12">
                <p class="block text-muted clearfix">
                    Please Copy the Url of your youtube video (i.e :http://youtube.com/watch?v=u7deClndzQw) 
                </p>

                <?php if (Session::get('message')) { ?>
                    <p class="block clearfix text-red">
                        <i class="fa fa-exclamation-circle fa-2x pull-left "></i> <?= Session::get('message'); ?>
                    </p>
                <?php } ?>

                <style>

                    .parent {
                        width: 100%;
                        float: left;
                        margin-bottom: 12px;

                    }

                    .multiple {
                        max-height: 200px; overflow: auto; width: 100%; border: 1px solid #ddd;
                        list-style-type: none; margin: 0; padding: 10px; overflow-x: hidden;
                        font-weight: 300;
                    }



                </style>

                <form class="form-horizontal" method="post" action="<?= URL::current(); ?>" accept-charset="<?= Settings::get('en','charecter_set');?>" enctype="multipart/form-data">


                    <div class="form-group">
                        <label class="col-sm-2 control-label"></label>

                        <div class="col-sm-8">
                            <input type="text" class="field" name="video_link" id="video_link" > 
                            
                        </div>

                    </div>
                    
                    <div class="form-group">
                        <div class="col-sm-offset-2 col-sm-10">
                        <input type="hidden" name="pID" id="pID" value="<?= $postID;?>">
                            <button type="submit" class="btn btn-info">Upload</button>
                       </div>

                    </div>
                    
                     </form>
                     
                     <hr class="hr-normal">
				
					<ul>
						<?php if ($video) { ?>
						<?php foreach ($video as $video): ?>
						<li class="col-md-2"><a id="mediaVideo" href="#"
							data-toggle="modal" data-target="<?='#'.$video->id; ?>"
							data-theVideo="//www.youtube.com/embed/<?= $video->value;?>"> <img
								src="http://img.youtube.com/vi/<?= $video->value;?>/0.jpg">

						</a>

							<div class="modal fade" id="<?= $video->id; ?>" tabindex="-1"
								role="dialog" aria-labelledby="videoModal" aria-hidden="true">
								<div class="modal-dialog">
									<div class="modal-content">
										<div class="modal-header">
											<button type="button" class="close" data-dismiss="modal"
												aria-hidden="true">&times;</button>

											<?= $video->title; ?>
										</div>
										<div class="modal-body">
											<iframe width="100%" height="350"
												src="//www.youtube.com/embed/<?= $video->value; ?>"></iframe>
										</div>
									</div>
								</div>
							</div> <!-- /.modal -->
						</li>
						
						<?php endforeach;
	} else {
		?>
						<li>
							<div class="alert alert-warning">Opps! No data found...</div>
						</li>
						<?php } ?>

					</ul>
				</div>
			</div>
                     
            </div>
        </div>
   
<?php }?>